package com.tanhua;

import com.aliyuncs.exceptions.ClientException;
import com.tanhua.template.SmSTemplate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest //加载配置类 需要测试类的包名和配置类的包名一致
public class SpringBootDemo {

    @Autowired
    private SmSTemplate smSTemplate;

    @Test
    public void test1() throws ClientException {
        smSTemplate.sendSms("17798539446","123456");
    }
}
